strengur = input("Strengur: ")

stafirIStreng = []
fjoldi = []

for x in strengur:
	if x in stafirIStreng:
		fjoldi[stafirIStreng.index(x)] += 1
	else:
		stafirIStreng.append(x)
		fjoldi.append(1)
		
stafrof = list(stafirIStreng)
stafrof.sort()

for x in stafrof:
	print(x*fjoldi[stafirIStreng.index(x)])
